package com.cljz.makepassenger.ui.holder;

import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.cljz.makepassenger.R;
import com.cljz.makepassenger.model.net.bean.GetTypeListBean;

import java.util.List;

/**
 * Created by apple on 2017/5/15.
 */

public class PicTypeHolder extends RecyclerView.ViewHolder {

    private final TextView tvPicType;

    public PicTypeHolder(View itemView) {
        super(itemView);
        tvPicType = (TextView) itemView.findViewById(R.id.tv_pic_type);
    }

    public void setData(List<GetTypeListBean.DataBean> dataBeanList, int position) {
        GetTypeListBean.DataBean dataBean = dataBeanList.get(position);
        tvPicType.setText(dataBean.getCate_name());
        if (dataBean.getSelect()) {
            tvPicType.setTextColor(Color.parseColor("#25292f"));
        } else {
            tvPicType.setTextColor(Color.parseColor("#999999"));
        }
    }
}
